package com.ktkq.util;

import java.util.List;

import org.junit.Assert;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.ktkq.action.student.StudentAction;
import com.ktkq.dao.admin.AdminMapper;
import com.ktkq.dao.student.StudentMapper;
import com.ktkq.service.admin.AdminService;
import com.ktkq.service.student.StudentService;
import com.ktkq.vo.Admin;
import com.ktkq.vo.Student;


public class ConfigTest {  
	private ApplicationContext ctx = new TestApplicationContext().getCtx(); 
 @Test  
  public void testComponent() {  
        
      AdminService aMapper =  ctx.getBean(AdminService.class);
      
      StudentService sMapper =  ctx.getBean(StudentService.class);
      
   StudentAction saMapper =  ctx.getBean(StudentAction.class);
//      
//      Admin admin = new Admin();
//      Student student = new Student();
//      student.setStuName("fd");
//    System.out.println( sMapper.queryListById(1));
////      sMapper.insert(student);
//      Admin admin = new Admin();
//      admin.setName("fdf");
//     aMapper.insertUser(admin);
  	Assert.assertNotNull(aMapper); 
  }
  
 
   
} 